class MoviePicsController < ApplicationController
  
  layout 'layouts/admin_layout'
  
  def create
    attachment = MoviePic.batch_create(:attachments => params[:movie_pics], :movie_id => params[:id])
    if attachment[:exception] == "true"
      flash[:notice] = attachment[:flash]
      redirect_to :back 
      
    else
      flash[:notice] = "ok"
      redirect_to :back
    end
  end
  
end
